package com.charlotte.study.gupao.proxy.dbroute;

import com.charlotte.study.gupao.proxy.dbroute.proxy.OrderServiceDynamicProxy;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author junjie.ding
 * @date 2020/3/3
 */
public class main {
    public static void main(String[] args) throws ParseException {

        Order order = new Order();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Date date = sdf.parse("2020/03/01");
        order.setCreateTime(date.getTime());

        OrderServiceDynamicProxy proxy = new OrderServiceDynamicProxy();
        IOrderService proxyInstance = proxy.getInstance(new OrderService());

        proxyInstance.createOrder(order);

    }
}
